const videoWidth = '100vw';
const videoHeight = '100vh';

export default {
    videoWidth: videoWidth,
    videoHeight: videoHeight,
    inlineStyle: `
        #media-block {
            background-color: #000;
            display: none;
        }
        .scanner-box .box {
            width: 100%;
            height: 100%;
            position: relative;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            overflow: hidden;
        }
      
        .scanner-box .line {
            height: calc(100% - 2px);
            width: 100%;
            background: linear-gradient(180deg, rgba(0, 255, 51, 0) 43%, var(--scan-line-gradient-color, #fff) 211%);
            border-bottom: var(--scan-line-height, 1px) solid var(--scan-line-color, #fff);
            transform: translateY(-100%);
            animation: radar-beam 2s infinite;
            animation-timing-function: cubic-bezier(0.53, 0, 0.43, 0.99);
            animation-delay: 1.4s;
        }

        @keyframes radar-beam {
            0% {
                transform: translateY(-100%);
            }
        
            100% {
                transform: translateY(0);
            }
        }
        .bottom-block {
            position: fixed;
            width: 100vw;
            left: 0;
            bottom: 0px;
            padding: 16px 0;
            background-color: rgba(0, 0, 0, 0.6);
            z-index: 1010;
            padding-bottom: calc(constant(safe-area-inset-bottom) + 16px);
            padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
        }
      
        .xmedia-tips{
            font-size: 14px;
            color: #fff;
            padding: 0 16px 24px;
            text-align: center;
        }
      
        .bottom-btns {
            width: 100vw;
            display: flex;
            align-items: center;
        }
      
        .bottom-btns>div {
            width: 33.33%;
            text-align: center;
            flex: 1;
        }
      
        .bottom-btns>div:first-child {
            text-align: left;
            padding-left: 16px;
        }
      
        .bottom-btns>div:last-child {
            text-align: right;
            padding-right: 16px;
        }
      
        .bottom-btns button {
            padding: 0;
            margin: 0;
            border: none;
            font-size: 16px;
            background-color: transparent;
        }
      
        .xmedia-back-btn {
            width: 100%;
            text-align: left;
            color: var(--xmedia-cancel-color, #999);
        }
      
        .xmedia-file-btn {
            width: 100%;
            text-align: right;
            color: var(--xmedia-confirm-color, #0074D9);
        }
      
        .bottom-btns .xmedia-take-btn {
            width: 62px;
            height: 62px;
            margin: 0 auto;
            border-radius: 100%;
            background-color: #000;
            border: 4px solid #fff;
            padding: 0;
            box-sizing: content-box;
            overflow: hidden;
        }
        .bottom-btns .xmedia-take-btn > span{
            display: block;
            width: 58px;
            height: 58px;
            margin: 2px;
            border-radius: 100%;
            background-color: #fff;
            padding: 0;
            z-index: 1010;
        }
        #H5_MEDIA_IMG{
            position: relative;
            left: -1000000px;
            display: none;
        }
    `,
    mediaBlockCss: `
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index:1000;
        overflow: hidden;
    `,

    // video模板
    videoTpl: setting => `
        <video id="mediavideo" muted src="" crossorigin="anonymous" autoplay webkit-playsinline playsinline 
        style="
            width: ${setting.height};
            height: ${setting.width};
            position: fixed;
            top: 0;
            left: 0;
            z-index:1000;
            object-fit: cover;
        "
        ></video>
    `,

    guideCss: `
        position: relative;
        margin: 100px auto 0;
        width: 94vw;
        height: calc(94vw * 0.75);
        border: 1px solid #fff;
        border-radius: 4px;
        box-shadow: 0 0 0 1000px rgba(0, 0, 0, .6);
        z-index: 1005;
    `,

    takeBtnCss: `
        width: 60px;
        height: 60px;
        margin: 0 auto;
        border-radius: 100%;
        background-color: #fff;
        color: #fff;
        border: 6px solid #000;
        outline: 2px solid#fff;
        padding: 0;
        overflow: hidden;
    `,

}